package com.zk;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@SpringBootApplication
@Controller
public class ZkSysApplication extends SpringBootServletInitializer {

    public static void main(String[] args) {
        SpringApplication.run(ZkSysApplication.class, args);
    }

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(ZkSysApplication.class);
    }

    @RequestMapping("/test")
    public String test(Model model) {
        model.addAttribute("msg", "hello Eden");
        return "test";
    }
}
